package com.dragon.cloud.common.config;
//
//import com.br.cloud.br.common.core.oauth.HaierOAuth2AccessTokenResponseClient;
//import com.br.cloud.br.common.core.oauth.HaierOAuth2UserService;
//import com.br.cloud.br.common.core.oauth.HaierUserInfo;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableOAuth2Client;
//
///**
// * @author yzp
// * @date 2021/2/18 17:09
// */
//@EnableWebSecurity
//@EnableOAuth2Client
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//
//    @Override
//    public void configure(HttpSecurity http) throws Exception {
//        http.authorizeRequests()
//                .antMatchers().permitAll()
//                .anyRequest().authenticated();
//        http.oauth2Login().tokenEndpoint().accessTokenResponseClient(new HaierOAuth2AccessTokenResponseClient())
//                .and()
//                .userInfoEndpoint()
//                .customUserType(HaierUserInfo.class,"haier")
//                .userService(new HaierOAuth2UserService());
//    }
//}
